package com.bw.product.controller;

import com.bw.common.core.domain.Result;
import com.bw.common.security.annotation.RequiresPermissions;
import com.bw.product.domain.PmsAttrGroup;
import com.bw.product.domain.vo.AttrGroupVo;
import com.bw.product.service.PmsAttrGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 属性分组Controller
 */
@RestController
@RequestMapping("/PmsAttrGroup")
public class PmsAttrGroupController {
    @Autowired
    private PmsAttrGroupService pmsAttrGroupService;
    /**
     * 根据attrGroupId获取属性分组详细信息
     */
    @RequiresPermissions("product:PmsAttrGroup:query")
    @GetMapping(value = "/{attrGroupId}")
    public Result<PmsAttrGroup> getInfo(@PathVariable("attrGroupId") Long attrGroupId)
    {
       PmsAttrGroup pmsAttrGroup= pmsAttrGroupService.selectPmsAttrGroupByAttrGroupId(attrGroupId);
       return Result.success(pmsAttrGroup);
    }

}
